﻿<%@ Page Language="C#" AutoEventWireup="True" Inherits="AddItems" Codebehind="AddItems.aspx.cs" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body background="img/bg.jpg">
    <form id="form1" runat="server">
    <p>
        <asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/ControlPanel.aspx">Return to Control Panel</asp:HyperLink>
    </p>
    <p>
        Here you may 
        add definition of Object into database. You can add data based on the definition 
        of Object. The attrribute is defined as follows: Name(string), type(string) 
        (e.g. price, int).
    </p>
    <div style="font-style: normal; font-weight: bold">
    
        Object Name:<asp:TextBox ID="TB_Items" runat="server" Width="130px"></asp:TextBox>
        <br />
        <br />
        Attributes:<br />
    </div>
    <div style="font-style: normal">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Name:&nbsp;&nbsp;&nbsp;&nbsp; 
        <asp:TextBox ID="TB_Atr" runat="server"></asp:TextBox>
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Type:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <asp:DropDownList 
            ID="DropDownList_type" runat="server" 
            onselectedindexchanged="DropDownList_type_SelectedIndexChanged">
        </asp:DropDownList>
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        AllowNull:&nbsp;&nbsp; <asp:RadioButton 
            ID="rdoNullTrue" runat="server" Checked="True" GroupName="AllowNull" 
            Text="True" />
&nbsp;&nbsp;&nbsp;
        <asp:RadioButton ID="rdoNullFalse" runat="server" GroupName="AllowNull" 
            Text="False" />
        <br />
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Primary Key:<asp:RadioButton 
            ID="rdoPriKeyTrue" runat="server" GroupName="PriKey" 
            Text="True" />
&nbsp;&nbsp;&nbsp;
        <asp:RadioButton ID="rdoPriKeyFalse" runat="server" GroupName="PriKey" 
            Text="False" Checked="True" />
    
        <br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        Default:&nbsp;
        <asp:TextBox ID="TB_DF" runat="server"></asp:TextBox>
    
    &nbsp;<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" 
            EnableModelValidation="True">
            <Columns>
                <asp:BoundField DataField="name" HeaderText="Name">
                <HeaderStyle BackColor="#0066FF" />
                </asp:BoundField>
                <asp:BoundField DataField="type" HeaderText="Type">
                <HeaderStyle BackColor="#0066FF" />
                </asp:BoundField>
                <asp:BoundField DataField="allownull" HeaderText="Allownull">
                <HeaderStyle BackColor="#0066FF" />
                </asp:BoundField>
                <asp:BoundField DataField="default" HeaderText="Default">
                <HeaderStyle BackColor="#0066FF" />
                </asp:BoundField>
                <asp:BoundField DataField="columnID" HeaderText="Column ID">
                <HeaderStyle BackColor="#0066FF" />
                </asp:BoundField>
                <asp:BoundField DataField="priKey" HeaderText="Primimary Key">
                <HeaderStyle BackColor="#0066FF" />
                </asp:BoundField>
                <asp:BoundField DataField="col_Id" HeaderText="Col ID">
                <HeaderStyle BackColor="#0066FF" />
                </asp:BoundField>
            </Columns>
        </asp:GridView>
    <p style="height: 24px">
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <asp:Button ID="BT_ADD" runat="server" Text="ADD" OnClick ="ADD_click" 
            Width="56px" />
    </p>
    </div>
    
    <div style="font-style: normal; font-weight: bold">
        Discription:<br />
        <asp:TextBox ID="TB_DCP" runat="server" Height="23px" Width="247px"></asp:TextBox>
        </div>
    <p>
        <asp:Button ID="BT_FINISH" runat="server" Text="FINISH" 
            OnClick = "FINISH_click" Height="25px" />
    </p>
    <p>
        <asp:Label ID="lblErr" runat="server" ForeColor="Red"></asp:Label>
    </p>
    </form>
</body>
</html>
